{extend name="index/index"}
{block name="mycss"}
<link href="/static/index/css/pic.css" rel="stylesheet">
<link href="/static/index/css/pic1.css" rel="stylesheet">
<link href="/static/index/css/style.css" rel="stylesheet" type="text/css" media="all"/>
{/block}

{block name="fjs"}
<script type="text/javascript">
    var now = new Date();
    var beginTime = now.getTime();
    var b = 1;
    var stime = "1534990869";
    setInterval(function () {
        stime++;
    }, 1000);
</script>
{/block}

{block name="main"}
<div style="background-color: red;">
</div>
{/block}

{block name="main1"}
<div class="box-topic" data-lkid="15">
    <div class="w1200">
        <div class="topic-wrap h-lg roll-box " id="NO08758">
            <div class="roll-wrap">
                <div class="clearfix" style="width: 1300px;">
                    <div class="qv-index">
                        <div class="qv-back"
                             style="background-image: url(&quot;http://icon.qiantucdn.com///20180720/26cd10bb0784eac43ab099679eb933182&quot;);">
                            <!---->
                            <div class="qv-share"><i class="icon icon-fenxiang"></i>
                                <div class="shareContent handle-share">
                                    <div class="Arrow"></div>
                                    <ul class="img-share bdsharebuttonbox bdshare-button-style0-16"
                                        data-bd-bind="1535432758792">
                                        <a href="javascript:void (0);" title="分享到QQ好友" data-cmd="qzone" class="bds_qzone"><i></i>QQ</a>
                                        <a href="javascript:void (0);" title="分享到新浪微博" data-cmd="tsina"
                                           class="bds_tsina "><i></i>微博</a> 
                                           <a href="javascript:void (0);" title="分享到花瓣" data-cmd="huaban" class="bds_huaban"><i></i>花瓣</a>
                                    </ul>
                                </div>
                            </div>
                            <div class="qv-text">
                                <div class="qv-attention"><span>关注<br><strong class="">{$friendscount}</strong></span></div>
                                <div class="qv-bean"><span>粉丝<br><strong class="fas-num">{$fanscount}</strong></span></div>
                            </div>
                            {if condition="($userinfo.icon)"}
                            <div class="qv-via"
                                 style="background-image: url(&quot;http://pdyc9epam.bkt.clouddn.com/{$userinfo.icon}&quot;);"></div>
                            </div>
                            {else /}
                            <div class="qv-via"
                                 style="background-image: url(&quot;static/default.jpg&quot;);"></div>
                            </div>
                            {/if}
                        <div class="qv-rowName"><h4 class="qv-name">{$userinfo.nickname}</h4></div>
                            <div class="qv-homeBtn"><!----> <!---->
                                    <a class=" qt-btn btn-green-linear" style="margin-top: 10px;width: 100px;height: 40px;line-height: 40px;color: #fff" href="{:url('index/personal/edit')}" >个人资料</a>
                            </div>                            
                        <nav id="qv-nav">
                            <ul>
                                <a href="{:url('index/details/home',['name'=>$userinfo.nickname])}"><li class="">作品</li></a>
                                <li class="router-link-exact-active active active"><a href="{:url('index/details/collect')}">收藏</a></li>
                                <a href="{:url('index/details/attention')}"><li class="">关注</li></a>
                            </ul>
                        </nav>
                    </div>
                    <!--首页遍历-->
                    {if condition="$collect"}
                        {volist name="collect" id="v" key="k"}
                            <div class="qt-card-primary wrap-list roll-list fl " id="goodsinfo">
                                <div class="card-img">
                                    <a href="{:url('index/details/newpic',['id'=>$v[0]['id']])}" target="_blank"  class="clickL" data-id="15-0-0">
                                    <div class="card-trait">
                                        <div class="card-tag-business "></div>
                                    </div>
                                    <img class="" src="http://pdyc9epam.bkt.clouddn.com/{$v[0]['icon']}" alt="" width="268" height="356" >
                                    <div class="card-bg"></div>
                                    <div class="card-handle">
                                        <div class="handle-dum qt-btn btn-green-linear download-page" data-id="32218731"
                                             data-yc="1" data-bg="0">
                                            <span cass="glyphicon glyphicon-download-alt">VIP免费下载</span>
                                        </div>
                                        <div class="handle-fav bottom-fav-ajax"  data-action="addFav" style="font-size:20px">
                                            <div class="" style="margin-top: -5px;margin-left: 5px">
                                                <span class="glyphicon glyphicon-heart house-btn" data-id="{$v[0]['id']}" style="color: red"></span>
                                            </div>
                                        </div>
                                    </div>
                                </a>
                                </div>
                                <div class="card-tag  isYC"></div>
                                <p class="card-title">{$v[0]['desc']}</p>
                                <a href=""  class="card-title card-intro" target="_blank"><span
                                    class="glyphicon glyphicon-download-alt  ">下载数量:{$v[0]['sold']}</span> &nbsp;&nbsp;
                                    <span class="glyphicon glyphicon-gift ">收藏数量:{$v[0]['house']}</span>
                                </a>
                            </div>
                        {/volist}
                    {else/}
                            <a href="{:url('index/index/index')}" ><img src="/static/col.jpg" alt=""></a>
                    {/if}
                </div>
                        {$page}
            </div>
        </div>
    </div>
</div>


{/block}


{block name="myjs"}
<script>

            $('.house-btn').click(function(){
                var gid =$(this).attr('data-id');
                var obj = $(this).parents('#goodsinfo');
                if (confirm('你确定不在收藏它吗?')){
                    cancelAjax(gid,obj);
                }
                    return false;
            })

            function cancelAjax(gid,obj)
            {
                $.ajax({
                    type:'get',
                    dataType:'json',
                    data:{'gid':gid},
                    url:'indexcancel',
                    success:function(data){
                        if(data.status){
                            toastr.success(data.info);
                            obj.remove();
                        }else{
                            toastr.error(data.info);
                        }
                    },
                    error:function(){
                        toastr.error('系统错误');
                    }
                })
            }
</script>
{/block}